<?php

/**
 * EmployeeI18n filter form base class.
 *
 * @package    Amawal Invest
 * @subpackage filter
 * @author     Ameen Shoman<amin.shoman@gmail.com>
 */
abstract class BaseEmployeeI18nFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'first_name'  => new sfWidgetFormFilterInput(),
      'second_name' => new sfWidgetFormFilterInput(),
      'third_name'  => new sfWidgetFormFilterInput(),
      'fourth_name' => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'first_name'  => new sfValidatorPass(array('required' => false)),
      'second_name' => new sfValidatorPass(array('required' => false)),
      'third_name'  => new sfValidatorPass(array('required' => false)),
      'fourth_name' => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('employee_i18n_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'EmployeeI18n';
  }

  public function getFields()
  {
    return array(
      'first_name'  => 'Text',
      'second_name' => 'Text',
      'third_name'  => 'Text',
      'fourth_name' => 'Text',
      'id'          => 'ForeignKey',
      'culture'     => 'Text',
    );
  }
}
